﻿using System;
using System.Collections.Generic;
using System.Text;
using DevExpress.ExpressApp.Win;

namespace AppSCM.Win
{
    public class ImmediateSplash : ISplash
    {
        static private ImmediateSplashForm formCore;

        #region ISplash Members

        public void Start()
        {
            if (formCore == null)
            {
                formCore = new ImmediateSplashForm();
                formCore.Show();
                System.Windows.Forms.Application.DoEvents();
            }
        }
        public void Stop()
        {
            if (formCore != null)
            {
                formCore.Close();
                formCore.Dispose();
                formCore = null;
            }
        }
        public bool IsStarted
        {
            get { return formCore != null; }
        }
        public void SetDisplayText(string displayText)
        {
            formCore.Text = displayText;
        }

        #endregion
    }
}
